package com.slz3.business.module.memberManagement.memCollect.steward;

import com.slz3.business.module.memberManagement.memCollect.domain.MemCollect;
import com.slz3.business.module.memberManagement.memCollect.domain.MemCollectCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MemCollectResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(MemCollect.class).flatMap(memCollect ->
                MemCollectResController.add(req, memCollect)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(MemCollectCondition.class).flatMap(memCollectCondition ->
                MemCollectResController.delete(req, memCollectCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(MemCollect.class).flatMap(memCollect ->
                MemCollectResController.modify(req, memCollect)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return MemCollectResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return MemCollectResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return MemCollectResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(MemCollectCondition.class).flatMap(memCollectCondition ->
                MemCollectResController.auditSubmit(req, memCollectCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(MemCollectCondition.class).flatMap(memCollectCondition ->
                MemCollectResController.audit(req, memCollectCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(MemCollectCondition.class).flatMap(memCollectCondition ->
                MemCollectResController.auditReject(req, memCollectCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(MemCollectCondition.class).flatMap(memCollectCondition ->
                MemCollectResController.usingEnable(req, memCollectCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(MemCollectCondition.class).flatMap(memCollectCondition ->
                MemCollectResController.usingDisable(req, memCollectCondition)
        );
    }   

}
